#include "TileKey.h"



TileKey::TileKey(int level, int row, int colnum):
m_level(-1),m_row(-1),m_colnum(-1)
{
	m_level =level;
	m_row = row;
	m_colnum = colnum;
	
}



TileKey::~TileKey()
{
}


bool TileKey::operator==(const TileKey & other) const
{
	if (this->m_level==other.m_level&&this->m_row==other.m_row&&this->m_colnum==other.m_colnum)
	{
		return true;
	}
	return false;
}

void TileKey::operator=(const TileKey & other)
{
	this->m_level = other.m_level;
	this->m_colnum = other.m_colnum;
	this->m_row = other.m_row;
}

bool TileKey::operator<(const TileKey & rhs) const
{
	if (this->m_level<rhs.m_level)
	{
		return true;
	}else if (this->m_level>rhs.m_level)
	{
			return false;
	}else if (this->m_level==rhs.m_level)
	{
		if (this->m_row<rhs.m_row)
		{
			return true;
		}else if (this->m_row>rhs.m_row)
		{
			return false;
		}else if (this->m_row==rhs.m_row)
		{
			if (this->m_colnum<rhs.m_colnum)
			{
				return true;
			}
			else {
				return false;
			}
		}
	}
	return false;
}
